strTargetInstallFolder =Session.Property("CustomActionData")
strTargetInstallFolder = RTrim(strTargetInstallFolder)
If InStrRev(strTargetInstallFolder, "\") = Len(strTargetInstallFolder) Then
	strTargetInstallFolder = Left (strTargetInstallFolder, Len(strTargetInstallFolder) - 1)
End If

Set oShell = CreateObject("WScript.Shell")
strProgramFilesFolder = oShell.ExpandEnvironmentStrings("%ProgramFiles%")
strProgramFilesFolder = Replace(strProgramFilesFolder, " (x86)", "", 1)
strProgramX86FilesFolder = strProgramFilesFolder + " (x86)"
strAppDataFolder = oShell.ExpandEnvironmentStrings("%APPDATA%")

strAppDataInstallFolder = Replace(strTargetInstallFolder, strProgramX86FilesFolder, strAppDataFolder, 1)
strAppDataInstallFolder = Replace(strAppDataInstallFolder, strProgramFilesFolder, strAppDataFolder, 1)

set fs=CreateObject("Scripting.FileSystemObject") 
If (StrComp(strTargetInstallFolder, strAppDataInstallFolder, 1) <> 0) and (fs.FolderExists(strAppDataInstallFolder)) Then
	fs.DeleteFolder strAppDataInstallFolder
End If
